<?php
class Feedback extends AppModel {
	var $name = 'Feedback';
	var $belongsTo = array(
			'User' => array(
					'className' => 'User',
					'foreignKey' => 'userId',
					'fields' => 'User.name'
			));
	function getRecents($limit = 3, $order = 'Feedback.since DESC'){
		$recursive = 1;
		$fields = array('Feedback.content,Feedback.since,Feedback.userId','User.name');
		return $this->find('all',array('fields'=>$fields,
				'limit' => $limit,
				'order' => $order,
				'recursive' => $recursive
		));
	}
}